{{#extends @html/layouts/layout-standart.html}}

{{:init}}
	{{@community.html:init}}
	{{!connect "screen/content-files.css" media="screen" charset="utf-8"}}
	{{!connect "screen/widgets-default.css" media="screen" charset="utf-8"}} 
	{{!connect "jquery.js"}}
	{{!connect "misc.js"}}
	{{!connect "feed.js"}}	
{{/:init}}

{{:content_class}}content-files{{/:content_class}}

{{:layout_right}}
	{{tags}}
	<div class="widget wg-selector wg-selector-files">
		<h3 class="header-">Файлы по типам</h3>
		<form action="">
			<ul class="list-">
				<li class="root-"><input type="checkbox" id="directory00" name="ftypes[]" /><label for="directory00">Все</label> {{files_count}}</li>
				{{!for types_list do=@:type_item}}
				{{:type_item}}
				<li class="{{*ext}}-"><input type="checkbox" id="directory-{{*ext}}" name="ftypes[{{*ext}}]" {{?*selected}}checked{{/?}}/><label for="directory-{{*ext}}">{{*ext}}</label> ({{*count}}) — {{*descr | safe}}</li>
				{{/:type_item}}
			</ul>
			<input type="image" src="{{images}}button-show.gif" alt="Показать" class="submit-" />
			<input type="hidden" value="{{_sort}}" name="sort" />
		</form>
	</div>
{{/:layout_right}}

{{:layout_main}}
<!-- ========================= Установки для работы js ============== -->
<a href="{{ajax_url}}" id="feed_url"></a>
<a href="{{items_remaining}}" id="items_remaining"></a>
<!-- ========================= Установки для работы js ============== -->

	<h1 class="title-">{{@:title}}</h1>
	<ul class="listmenu-">
		{{:order_ctl}}
			<li {{?!sort}}class="selected-"{{/?}}>{{?sort}}<a href="?sort={{sort}}">{{title}}</a>{{?:}}{{title}}{{/?}}</li>
		{{/:order_ctl}}

		{{?_sort=='name'}} {{@:order_ctl title='По алфавиту'}} 
		{{?:}} {{@:order_ctl title='По алфавиту' sort='name'}} {{/?}}

		{{?_sort=='size'}} {{@:order_ctl title='По размеру'}} 
		{{?:}} {{@:order_ctl title='По размеру' sort='size'}} {{/?}}

		{{?_sort=='date'}} {{@:order_ctl title='По дате'}} 
		{{?:}} {{@:order_ctl title='По дате' sort='date'}} {{/?}}
	</ul>
	<div class="list-" id="itemslist">
		{{@:files_list}}{{:files_list}}
			{{!for files_list do=@:file_item}}
			{{:file_item}}
			<div class="item-">
				<div class="author-"><a href="{{/}}{{community.url}}/members/{{*useroid}}">{{*user.fullname}}</a></div>
				<a href="{{/}}filestorage/{{*oid}}"><img src="{{images}}z.gif" alt="" class="typeico- typeico-{{*ext}}-" /></a>
				<a href="{{/}}filestorage/{{*oid}}" class="name-">{{*fname}}</a>  {{*size|formatfilesize}}
			</div>
			{{/:file_item}}
		{{/:files_list}}
	</div>
{{/:layout_main}}

{{:layout_pager}}
{{@feed.html:layout_pager}}
{{/:layout_pager}}
